﻿@using Orchard.ContentManagement;
@using Orchard.Core.Contents
@using Orchard.Utility.Extensions;
@{
    ContentItem contentItem = Model.ContentItem;
    var returnUrl = ViewContext.RequestContext.HttpContext.Request.ToUrlString();
}
<div class="summary" itemscope="itemscope" itemid="@contentItem.Id" itemtype="http://orchardproject.net/data/ContentItem">
    <div class="properties">
        <input type="checkbox" value="@contentItem.Id" name="itemIds"/>
        <h3>@Html.ItemAdminLink(contentItem)</h3> - <div class="contentType">@contentItem.TypeDefinition.DisplayName</div>
        @if (Model.Header != null) {
        <div class="header">@Display(Model.Header)</div>
        }
        @if (Model.Meta != null) {
        <div class="metadata">@Display(Model.Meta)</div>
        }
    </div>
    <div class="related">
        @Display(Model.Actions)
        @if (Authorizer.Authorize(Permissions.EditContent, contentItem)) {
            @Html.ItemEditLink(T("Edit").Text, contentItem)@T(" | ")
        }
        @if (Authorizer.Authorize(Permissions.DeleteContent, contentItem)) {
            @Html.Link(T("Delete").Text, Url.ItemRemoveUrl(contentItem, new {returnUrl}), new {itemprop = "RemoveUrl UnsafeUrl"})
        }
    </div>
    @if (Model.Content != null) {
    <div class="primary">@Display(Model.Content)</div>
    }
</div>